﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace Norma43
{
    public partial class ResumTotal : PhoneApplicationPage
    {
        public ResumTotal()
        {
            // Controlem el boto enrere
            this.BackKeyPress += new EventHandler<System.ComponentModel.CancelEventArgs>(OnBackKeyPress);
            InitializeComponent();
        }

        private void Ingressos_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            string url = "/Grafic.xaml?data=ingres";
            NavigationService.Navigate(new Uri(url, UriKind.Relative));
        }

        private void Despeses_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            string url = "/Grafic.xaml?data=despesa";
            NavigationService.Navigate(new Uri(url, UriKind.Relative));

        }

        private void btnRecalcular_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/recalcul.xaml", UriKind.Relative));
        }

        private void btnAlertes_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/alertes.xaml", UriKind.Relative));
        }

        private void btnPropostes_Click(object sender, RoutedEventArgs e)
        {
            NavigationService.Navigate(new Uri("/Propostes.xaml", UriKind.Relative));
        }

        private void Total_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            string url = "/Grafica.xaml";
            NavigationService.Navigate(new Uri(url, UriKind.Relative));
        }

        private void OnBackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
        {
            throw new Exception();
        }

    }
}
